package com.architexa.diagrams.ui;

import org.eclipse.jface.action.IMenuCreator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.events.HelpListener;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;

import com.architexa.org.eclipse.gef.extensions.ServerAction;

public class ChangeViewportAction implements ServerAction {

	private int w;
	private int h;
	private Control viewport;

	public ChangeViewportAction(Control control) {
		this.viewport = control;
	}

	public void addPropertyChangeListener(IPropertyChangeListener listener) {}

	public int getAccelerator() {
		return 0;
	}

	public String getActionDefinitionId() {
		return null;
	}

	public String getDescription() {
		return null;
	}

	public ImageDescriptor getDisabledImageDescriptor() {
		return null;
	}

	public HelpListener getHelpListener() {
		return null;
	}

	public ImageDescriptor getHoverImageDescriptor() {
		return null;
	}

	public String getId() {
		return null;
	}

	public ImageDescriptor getImageDescriptor() {
		return null;
	}

	public IMenuCreator getMenuCreator() {
		return null;
	}

	public int getStyle() {
		return 0;
	}

	public String getText() {
		return null;
	}

	public String getToolTipText() {
		return null;
	}

	public boolean isChecked() {
		return false;
	}

	public boolean isEnabled() {
		return false;
	}

	public boolean isHandled() {
		return false;
	}

	public void removePropertyChangeListener(IPropertyChangeListener listener) {}

	public void run() {
		viewport.setSize(w, h);
	}

	public void runWithEvent(Event event) { 	}

	public void setActionDefinitionId(String id) {}

	public void setChecked(boolean checked) {}

	public void setDescription(String text) {}

	public void setDisabledImageDescriptor(ImageDescriptor newImage) {}

	public void setEnabled(boolean enabled) {}

	public void setHelpListener(HelpListener listener) {}

	public void setHoverImageDescriptor(ImageDescriptor newImage) {}

	public void setId(String id) {}

	public void setImageDescriptor(ImageDescriptor newImage) {}

	public void setMenuCreator(IMenuCreator creator) {}

	public void setText(String text) {}

	public void setToolTipText(String text) {}

	public void setAccelerator(int keycode) {}

	public void init(Object[] params) {
		w = Integer.parseInt((String) params[0]);
		h = Integer.parseInt((String) params[1]);
	}

}
